function Demo(option_test, market_code, number_of_stocks, stock_codes, porfolio_weights)
    
    %option_test = 'index';
    %option_test = 'portfolio';

    switch option_test
        case 'index'
            if (isempty(market_code))
                market_code = getRandomMarketCode();
            end
            [codes date closed_price volume] = getIndex(cell2mat(market_code));
        case 'portfolio'
            [codes weights_p date close_price_p volume_p] = getPortfolio(market_code, number_of_stocks, stock_codes, porfolio_weights);
            closed_price = closed_price * weights_p';
        otherwise
    end
    
    short_MA_length = 5;
    long_MA_length  = 100;
    band = 0.05;
    
    testVLMA_option = 's';
    %testVLMA_option = 'e';
    
    [rPrice, rPrice_Buy, rPrice_Sell, num_buy, num_sell] = testVLMA(closed_price, short_MA_length, long_MA_length, band, testVLMA_option);
    
    
end